home *** CD-ROM | disk | FTP | other *** search
/ Champak 40 / Vol 40.iso / games / super_su.swf / scripts / DefineSprite_255 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-04-19  |  645 b   |  32 lines

  1. function mStepFrame(interval)
  2. {
  3.    if(this._parent.oChar.strMode == "paddling")
  4.    {
  5.       if(Key.isDown(32) || Key.isDown(39) || Key.isDown(37))
  6.       {
  7.          this._parent.mInitGame();
  8.       }
  9.    }
  10.    if(this._parent.oChar.strMode == "surfing")
  11.    {
  12.       if(Key.isDown(32))
  13.       {
  14.          var step = this.intStep * this.mult;
  15.       }
  16.       else
  17.       {
  18.          var step = this.intStep;
  19.       }
  20.    }
  21.    if(Key.isDown(39))
  22.    {
  23.       this.oChar.mRotate(step * interval);
  24.    }
  25.    if(Key.isDown(37))
  26.    {
  27.       this.oChar.mRotate((- step) * interval);
  28.    }
  29. }
  30. this.intStep = 0.19634954084936207;
  31. this.mult = 2;
  32.